class Person {
  String name;
  int age;
  //---默认构造函数的简写
  Person({required this.name, required this.age});

  void getInfo() {
    print("${this.name}---${this.age}");
  }
}

void main(List<String> args) {
  Person p = new Person(name: "张三", age: 20);
  p.getInfo();
}
